from appium.webdriver.common.appiumby import AppiumBy

from base.wecom_app import WeComApp
from utils.log_utils import logger


class MoreSettingsPage(WeComApp):
    _EDIT_PERSON_BTN = AppiumBy.XPATH, "//*[@text='编辑成员']"

    def goto_edit_person_page(self):
        logger.info("定位并点击【编辑成员】按钮")
        self.find_and_click(*self._EDIT_PERSON_BTN)

        from page.edit_person_page import EditPersonPage
        return EditPersonPage(self.driver)
